package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitBusQrCodeMapper;
import com.ruoyi.bus.domain.WitBusQrCode;
import com.ruoyi.bus.service.IWitBusQrCodeService;

/**
 * 车辆二维码Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-04-23
 */
@Service
public class WitBusQrCodeServiceImpl implements IWitBusQrCodeService 
{
    @Autowired
    private WitBusQrCodeMapper witBusQrCodeMapper;

    /**
     * 查询车辆二维码
     * 
     * @param routeQrId 车辆二维码ID
     * @return 车辆二维码
     */
    @Override
    public WitBusQrCode selectWitBusQrCodeById(Long routeQrId)
    {
        return witBusQrCodeMapper.selectWitBusQrCodeById(routeQrId);
    }

    /**
     * 查询车辆二维码列表
     * 
     * @param witBusQrCode 车辆二维码
     * @return 车辆二维码
     */
    @Override
    public List<WitBusQrCode> selectWitBusQrCodeList(WitBusQrCode witBusQrCode)
    {
        return witBusQrCodeMapper.selectWitBusQrCodeList(witBusQrCode);
    }

    /**
     * 新增车辆二维码
     * 
     * @param witBusQrCode 车辆二维码
     * @return 结果
     */
    @Override
    public int insertWitBusQrCode(WitBusQrCode witBusQrCode)
    {
        witBusQrCode.setCreateTime(DateUtils.getNowDate());
        return witBusQrCodeMapper.insertWitBusQrCode(witBusQrCode);
    }

    /**
     * 修改车辆二维码
     * 
     * @param witBusQrCode 车辆二维码
     * @return 结果
     */
    @Override
    public int updateWitBusQrCode(WitBusQrCode witBusQrCode)
    {
        return witBusQrCodeMapper.updateWitBusQrCode(witBusQrCode);
    }

    /**
     * 批量删除车辆二维码
     * 
     * @param routeQrIds 需要删除的车辆二维码ID
     * @return 结果
     */
    @Override
    public int deleteWitBusQrCodeByIds(Long[] routeQrIds)
    {
        return witBusQrCodeMapper.deleteWitBusQrCodeByIds(routeQrIds);
    }

    /**
     * 删除车辆二维码信息
     * 
     * @param routeQrId 车辆二维码ID
     * @return 结果
     */
    @Override
    public int deleteWitBusQrCodeById(Long routeQrId)
    {
        return witBusQrCodeMapper.deleteWitBusQrCodeById(routeQrId);
    }
}
